/*
 * 文件名：LogServiceImpl.java
 * 版权：Copyright by www.zcsy.com
 * 描述：
 * 修改人：Administrator
 * 修改时间：2015年8月24日
 * 跟踪单号：
 * 修改单号：
 * 修改内容：
 */

package com.zcsy.manage.service.system.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zcsy.commons.util.DateUtils;
import com.zcsy.manage.model.system.Log;
import com.zcsy.manage.persistence.system.LogDao;
import com.zcsy.manage.persistence.system.UserDao;
import com.zcsy.manage.service.system.ILogService;

/**
 * @Title: LogServiceImpl.java
 * @Package： com.zcsy.shop.service.system.impl 
 * @Description: 用户操作日志service层实体类
 *
 * @author caiyinli 13277030520@163.com
 * @Copyright: 2015 武汉中财数元信息技术有限公司 All rights reserved.
 * @date 2015年8月24日
 * @version 1.0
 * @see JDK1.7.0_75
 * @since
 */
@Service
public class LogServiceImpl extends SystemComService implements ILogService {
	@Autowired
	private LogDao logDao;
	
	@Autowired
	private UserDao userDao;
	
	/* (non-Javadoc)
	 * @see com.zcsy.shop.service.system.ILogService#insert(com.zcsy.shop.model.system.Log)
	 */
	@Override
	public int insert(Log record) {
		record.setOperatetime(DateUtils.getFmtDate());
		return logDao.insert(record);
	}

	/* (non-Javadoc)
	 * @see com.zcsy.shop.service.system.ILogService#deleteByIds(java.util.List)
	 */
	@Override
	public int deleteByIds(List<String> ids) {
		return logDao.deleteByIds(ids);
	}

	/* (non-Javadoc)
	 * @see com.zcsy.shop.service.system.ILogService#getLogByPage(com.zcsy.shop.model.system.Log)
	 */
	@Override
	public List<Log> getByPage(Log record) {
		List<Log> list = logDao.getByPage(record);
		
		return list;
	}

	/* (non-Javadoc)
	 * @see com.zcsy.shop.service.system.ILogService#selectById(java.lang.Integer)
	 */
	@Override
	public Log selectById(String id) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * @see com.zcsy.manage.service.system.ILogService#getReport()
	 */
    @Override
    public List<Map<String, Object>> getReport() {
        
        return logDao.getReport();
    }

    @Override
    public List<Map<String, Object>> getReportByDate() {

        return logDao.getReportByDate();
    }

    @Override
    public List<Map<String, Object>> getReportByWeek() {
        
        return logDao.getReportByWeek();
    }

    @Override
    public List<Map<String, Object>> getReportByMonth() {

        return logDao.getReportByMonth();
    }
	
    
}
